home *** CD-ROM | disk | FTP | other *** search
- /*
- ClipMgr.h
-
- Clipping region management routines for Graphic Elements
-
- Copyright 1993-1995 by Al Evans and Pat Maupin. All rights reserved.
-
- Written 4/10/95
- */
-
- #ifndef CLIPMGR
- #define CLIPMGR
-
- #include "Defs.h"
-
- /*
- RecalcClipRegion dynamically builds a clipping region by combining
- two separately maintained regions with the animation rectangle:
-
- clipRgn = animationRect - userCovered - otherWorldsCover
-
- It handles either or both of these covering regions being null,
- and handles differences between PCs and MACs -- on PCs, the clip
- region is relative to the enclosing window, whereas on MACs the
- clip region is relative to the viewport (the world's focus rectangle).
-
- If it cannot allocate a temporary region for its work, it will
- fail softly by failing to provide any clipping.
- */
-
- GE_CALLBACK(void,RecalcClipRegion)(GEWorldPtr world);
-
- /*
- PutWorldOnTop maintains a world list in Z-order. It can be
- called whenever a world is moved or otherwise receives the
- focus.
-
- PutWorldOnTop moves a world to the top of its worldlist,
- and recalculates the clip region for that world, and all other
- worlds in the worldlist which share the same grafPort.
-
- Each world is clipped by a user specified exclusion region,
- plus a computed exclusion region which is the union of the
- visible regions of all worlds above it.
- */
-
- GE_CALLBACK(void,PutWorldOnTop)(GEWorldPtr topWorld);
-
- /*
- CoverRegion/CoverRect/UncoverRegion/UncoverRect may be called
- by user code to define an exclusion area for a world. Note that
- this exclusion area ONLY applies to the given world. This allows
- the technique to be used to let a lower world "bleed through" a
- world above it in certain areas.
- */
-
- GE_CALLBACK(void,CoverRegion)(GEWorldPtr world, RgnHandle coveredRgn);
- GE_CALLBACK(void,UncoverRegion)(GEWorldPtr world, RgnHandle rgnToUncover);
- GE_CALLBACK(void,CoverRect)(GEWorldPtr world, Rect *coveredRect);
- GE_CALLBACK(void,UncoverRect)(GEWorldPtr world, Rect *rectToUncover);
-
- /*
- UncoverWorld removes any user-defined cover from the world,
- places the world at the top of the Z-order, and causes the
- entire world to be redisplayed on the next update.
- */
- GE_CALLBACK(void,UncoverWorld)(GEWorldPtr world);
-
- #endif
-